Yansıma Efekti Ekle
Yansıma Efekti ile Metin Oluşturma
Yansıma etkisi, metnin altında yansıtılmış bir görüntü ekleyerek cilalı ve modern bir görünüm oluşturur. In IronWord, this effect is applied through the ReflectionEffect property of a TextEffect object, which can be customized or used with default settings.
To implement a reflection effect, create a TextStyle and configure its TextEffect property with a Reflection instance. The Reflection class supports default initialization, which applies standard reflection parameters suitable for most use cases. Özelleştirilmiş yansımalar için, uzaklık, bulanıklık ve şeffaflık gibi özellikler ince ayar yapmak için ayarlanabilir.
After defining the text style, create a Run containing your TextContent and assign the configured style to the run. Use AddChild to add the run to a paragraph, maintaining the proper document hierarchy of Document → Paragraph → Run → TextContent. Son olarak, yansıma etkisini uygulamak için paragrafı belgeye ekleyin.
Kod Açıklaması
Hadi yeni bir Word belgesi oluşturup içine yansıma etkili metin ekleyelim. Initially, a new WordDocument object named doc is created. A TextStyle object is then instantiated and configured to include a reflection effect by setting its TextEffect property to a new Reflection object.
To add the styled text with the reflection effect, a Paragraph is created, then a Run object is created containing TextContent with "Hello World". The TextStyle is assigned to the Run, applying the reflection effect. The Run is added to the Paragraph using AddChild, and the Paragraph is added to the document. Bu, doküman hiyerrarşisini takip eder: Doküman → Paragraf → Kosu → TextContent. Son olarak, belge kaydedilir.

